package com.wlj.security;

import org.springframework.social.connect.Connection;
import org.springframework.social.connect.ConnectionSignUp;
import org.springframework.stereotype.Component;

@Component
public class DemoConnectionSignUp implements ConnectionSignUp {

    @Override
    public String execute(Connection<?> connection) {
        //当用户选择社交登录时系统检查其并没有业务账号则为其自动创建个默认账号
        //TODO 根据用户社交信息创建  业务系统用户  并返回唯一标识
        return connection.getDisplayName();
    }
}
